﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master/Site.Master" AutoEventWireup="true" CodeBehind="search.aspx.cs" Inherits="BookClubIt.Books" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div class="container">
<div class="content-wide">
<div class="book_search_box">
<span>Search:</span>
<asp:TextBox runat="server" ID="txtSearch" Width="200px"/>
<asp:Button runat="server" ID="btnSearch" Text="Search" CssClass="btn btn-primary" OnClick="SearchBook_Click" />
</div>
<ul class="tabs">
<li><asp:HyperLink ID="lnkBookTab" runat="server" Text="Books" /></li>
<li><asp:HyperLink ID="lnkBookClubsTab" runat="server" Text="Book clubs" /></li>
</ul>
<div class="tabs-bottom">&nbsp;</div>

<asp:Panel ID="pnlBookSearch" runat="server" CSSClass="book_search">
<h3>Search for '<asp:label ID="lblBookSearchTitle" runat="server" />' books</h3>

<asp:Panel ID="pnlNoBooks" runat="server" CssClass="no-results" Visible="false">
<h3>No books found</h3>
<p>Please broaden your search or try a different term.</p>
</asp:Panel>

<asp:Repeater runat="server" ID="rptBooks"  OnItemDataBound="rptBooks_OnItemDataBound">
<HeaderTemplate>
<table width="100%" cellpadding="0" cellspacing="0" class="book-search">
</HeaderTemplate>
    <ItemTemplate>
            <tr>
            <td><asp:Image ID="imgBookImage" runat="server" Height="72px" Width="50px" /></td>
             <td class="details"><asp:HyperLink ID="lnkBookLink" runat="server" /> <asp:Label ID="lblAuthor" runat="server" /></td>
               </tr>
    </ItemTemplate>
    <FooterTemplate></table></FooterTemplate>
</asp:Repeater>
</asp:Panel>

<asp:Panel ID="pnlBookClubSearch" runat="server" CssClass="book-club-search">
<h3>Search for '<asp:label ID="lblClubQuery" runat="server" />' book clubs</h3>

<asp:Panel ID="pnlNoClubs" runat="server" CssClass="no-results" Visible="false">
<h3>No book clubs found</h3>
<p>Please broaden your search or try a different term.</p>
</asp:Panel>

<asp:GridView ID="grdBrowseClubs"
 OnRowDataBound="grdBrowseClubs_OnRowDataBound"
  runat="server"
   AutoGenerateColumns="false"
    AlternatingRowStyle-CssClass="alt"
     CssClass="table browse-clubs"
     BorderWidth="0"
     GridLines="None"
      AllowPaging="True"
       PageSize="15"
      OnPageIndexChanging="grdBrowseClubs_PageIndexChanging">
<Columns>
 <asp:TemplateField ItemStyle-CssClass="avatar-row">
           <HeaderTemplate>
            
           </HeaderTemplate>
           <ItemTemplate>
          
           <asp:Image ID="imgClubAvatar" runat="server" Height="50px" Width="50px" />
           </ItemTemplate>
      </asp:TemplateField>

    <asp:TemplateField HeaderStyle-CssClass="main-link" ItemStyle-CssClass="main-link">
           <HeaderTemplate >
               Book Club
           </HeaderTemplate>
           <ItemTemplate>
           <asp:HyperLink ID="lnkBookClub" runat="server" />
           
           </ItemTemplate>
      </asp:TemplateField>

          <asp:TemplateField>
           <HeaderTemplate>
                Type
           </HeaderTemplate>
           <ItemTemplate>
                <asp:Label runat="server" ID="lblClubType"/>
           </ItemTemplate>
      </asp:TemplateField>
       <asp:TemplateField>
           <HeaderTemplate>
                Genre
           </HeaderTemplate>
           <ItemTemplate>
                <asp:Label runat="server" ID="lblGenreType"/>
           </ItemTemplate>
      </asp:TemplateField>
        <asp:TemplateField>
           <HeaderTemplate>
                Members
           </HeaderTemplate>
           <ItemTemplate>
                <asp:Label runat="server" ID="lblNumMembers"/>
           </ItemTemplate>
      </asp:TemplateField>

        <asp:TemplateField>
           <HeaderTemplate>
                Reading
           </HeaderTemplate>
           <ItemTemplate>
             <asp:Image ID="imgCurrentBook" runat="server" Height="50px" Width="35px" ImageAlign="Left" />
                <asp:Label runat="server" ID="lblCurrentBook" Visible=false/>
              
           </ItemTemplate>
      </asp:TemplateField>

         <asp:TemplateField>
           <HeaderTemplate>
                Created
           </HeaderTemplate>
           <ItemTemplate>
                <asp:Label runat="server" ID="lblCreatedDate"/>
           </ItemTemplate>
      </asp:TemplateField>

       <asp:TemplateField ItemStyle-CssClass="buttons">
           <ItemTemplate>
             <asp:HyperLink ID="lnkViewClub" runat="server" CssClass="btn btn-small btn-info" Text="View" />
           </ItemTemplate>
      </asp:TemplateField>
</Columns>
<PagerStyle CssClass="pagination" />
</asp:GridView>

</asp:Panel>
</div>
<div class="sidebar">
<script type="text/javascript"><!--
    google_ad_client = "ca-pub-1776925204000985";
    /* BCI_SEARCH_BOOKS_RIGHT */
    google_ad_slot = "1167664280";
    google_ad_width = 250;
    google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

</div>
</div>
</asp:Content>
